package graphic;

import core.*;

public class Print {
	public void printRoom(Room room) {
		for (int i = 0; i < (room.getLongSide() * room.getShortSide()); i++) {
			Element e = room.getElement(i / room.getLongSide(),
					i % room.getLongSide());
			if (e instanceof Wall) {
				if ((i / room.getLongSide() == 0)
						|| (i / room.getLongSide() == (room.getShortSide() - 1))) {
					System.out.printf(" = ");
				} else
					System.out.printf(" | ");
			} else if (e instanceof Door)
				System.out.printf(" + ");
			else if (e instanceof Potion)
				System.out.printf(" * ");
			else if (e instanceof Player)
				System.out.printf(" @ ");
			else if (e instanceof Monster)
				System.out.printf(" M ");
			else
				System.out.printf(" - ");
			if (i % room.getLongSide() == room.getLongSide() - 1)
				System.out.printf("\n");
		}
		System.out.printf("\n");
	}

	public void printStatus(Player p) {
		System.out.printf("Player stats: HP=" + p.getHp() + "/" + p.getMaxHp()
				+ "\n\tWeapon=" + p.getWeapon());
	}
}
